I'm usign KMotion 4.33 and visual studio 2015 I also attached the project.
I created a simple form that only jog the X axis

if I press one of the buttons without the KFlop Plugged I get an error :

but if I click the button again this error doesn't show anymore, like the code is not allowed to throw an exception.
Below it's the code I'm using:
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
using KMotion_dotNet;
namespace Error_Test
{
public partial class Form1 : Form
{
KM_Controller KM = new KM_Controller();
public Form1()
{
InitializeComponent();
}
private void btn_Xpos_Click(object sender, EventArgs e)
{
SendCommand("Jog3=0");
}
private void btn_Xneg_Click(object sender, EventArgs e)
{
SendCommand("Jog3=0");
}
void SendCommand(string s)
{
try
{
KM.WriteLine(s);
}
catch (DMException ex) // in case disconnect in the middle of reading status
{
MessageBox.Show(ex.InnerException.Message);
}
}
private void btn_Xpos_MouseDown(object sender, MouseEventArgs e)
{
SendCommand("Jog3=2000");
}
private void btn_Xneg_MouseDown(object sender, MouseEventArgs e)
{
SendCommand("Jog3=-2000");
}
private void btn_Xpos_MouseUp(object sender, MouseEventArgs e)
{
SendCommand("Jog3=0");
}
private void btn_Xneg_MouseUp(object sender, MouseEventArgs e)
{
SendCommand("Jog3=0");
}
}
}